﻿using DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.StyleElements
{
    [XmlRoot("alignment", Namespace = Constants.ExcelMain)]
    public class Alignment : XmlSerializable
    {
        #region Attributes

        [Optional]
        [XmlAttribute("horizontal", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_HorizontalAlignment> Horizontal { get; set; }

        [Optional]
        [XmlAttribute("vertical", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_VerticalAlignment> Vertical { get; set; }

        [Optional]
        [XmlAttribute("textRotation", Form = XmlSchemaForm.Qualified)]
        public Nullable<uint> TextRotation { get; set; }

        [Optional]
        [XmlAttribute("wrapText", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> WrapText { get; set; }

        [Optional]
        [XmlAttribute("indent", Form = XmlSchemaForm.Qualified)]
        public Nullable<uint> Indent { get; set; }

        [Optional]
        [XmlAttribute("relativeIndent", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> RelativeIndent { get; set; }

        [Optional]
        [XmlAttribute("justifyLastLine", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> JustifyLastLine { get; set; }

        [Optional]
        [XmlAttribute("shrinkToFit", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> ShrinkToFit { get; set; }

        [Optional]
        [XmlAttribute("readingOrder", Form = XmlSchemaForm.Qualified)]
        public Nullable<uint> ReadingOrder { get; set; }

        #endregion

        public Alignment() { }
    }
}
